package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the EDUBACKGROUNDS database table.
 * 
 */
@Entity
@Table(name="EDUBACKGROUNDS")
@NamedQuery(name="Edubackground.findAll", query="SELECT e FROM Edubackground e")
public class Edubackground implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="EDUBACKGROUNDS_EDUID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EDUBACKGROUNDS_EDUID_GENERATOR")
	@Column(name="EDU_ID")
	private long eduId;

	@Column(name="EDU_CREATORDATE")
	private Timestamp eduCreatordate;

	@Column(name="EDU_NAME")
	private String eduName;

	@Column(name="EDU_PERSON")
	private String eduPerson;

	@Column(name="EDU_UPDATEDATE")
	private Timestamp eduUpdatedate;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="edubackground")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	public Edubackground() {
	}

	public long getEduId() {
		return this.eduId;
	}

	public void setEduId(long eduId) {
		this.eduId = eduId;
	}

	public Timestamp getEduCreatordate() {
		return this.eduCreatordate;
	}

	public void setEduCreatordate(Timestamp eduCreatordate) {
		this.eduCreatordate = eduCreatordate;
	}

	public String getEduName() {
		return this.eduName;
	}

	public void setEduName(String eduName) {
		this.eduName = eduName;
	}

	public String getEduPerson() {
		return this.eduPerson;
	}

	public void setEduPerson(String eduPerson) {
		this.eduPerson = eduPerson;
	}

	public Timestamp getEduUpdatedate() {
		return this.eduUpdatedate;
	}

	public void setEduUpdatedate(Timestamp eduUpdatedate) {
		this.eduUpdatedate = eduUpdatedate;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setEdubackground(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setEdubackground(null);

		return staffInformation;
	}

}